package com.tedu.egsringbootmvc.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

@Data
public class UserArticleDTO {
    @ApiModelProperty(value = "文章标题",required = true,example = "今天天气不错")
    @NotBlank(message = "标题不能为空")
    @Size(min = 1,max = 20,message = "标题为1-20个字符")
    private String title;

    @ApiModelProperty(value = "文章正文",required = true,example = "下了一天的雨，有一点冷，一场秋雨一场寒。")
    @NotBlank(message = "正文不能为空")
    private String content;
}
